/* 
 * Copyright (C)2008 Vladimir Hozjan vladimir.hozjan@gmail.com
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */

/**
 * @file  tetrisBackground.h
 *
 * Background for tetris game
 *
 * @author Vladimir Hozjan
 * @date   26.12.2008 
 *
 * @remarks VHOZ [26.12.2008]: Class created
 */
#ifndef _tetrisBackground_h_
#define _tetrisBackground_h_

#include "tetrisMatrix.h"

/////////////////////////////////////////////////////  FORWARD CLASS DECLARATION
class TetrisElement;

/////////////////////////////////////////////////////////////  CLASS DECLARATION
/**
 * @class TetrisBackground
 *
 * Container for background matrix with elements
 *
 * @author VHOZ
 *
 * @remarks VHOZ [26.12.2008]: Class created
 */
class TetrisBackground : public TetrisMatrix {
public:
  /// Constructor
  TetrisBackground(int aWidth, int aHeight);

  /// Destructor
  ~TetrisBackground();

  /// Insert element into background
  void insertElement(int aRow, int aCol, TetrisElement *aElement);

  /// Check if is space in background for element
  bool isSpaceForElement(int aRow, int aCol, TetrisElement *aElement) const;

  /// Count full lines
  unsigned short countFullLines() const;

  /// clear full lines
  void clearFullLines();

protected:
private:
  /// Constructor
  TetrisBackground();

  /// Copy constructor
  TetrisBackground(TetrisBackground const &);
};

#endif // tetrisBackground_h__
